<header>
  <div class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <%= link_to @current_storytime_site.title, "/", class: "navbar-brand" %>
      </div>
      <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
          <%#= render Storytime::Navigation.find_by(handle: "main") %>
          <% Storytime::Page.published.each do |page| %>
            <li><%= link_to page.title, storytime.page_path(page) %></li>
          <% end %>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li>
            <%= link_to "#{t 'layout.subscribe_to', site_name: @current_storytime_site.title}", "#", data: {target: "#addSubscriptionModal", toggle: "modal"} %>
          </li>
          <% unless user_signed_in? %>
            <li><%= link_to "Sign In", Storytime.login_path %></li>
          <% end %>
        </ul>
      </div>
    </div>
  </div>
</header>
<%= render partial: "storytime/subscriptions/modal" %>